home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / grsear20.zip / GRINITDR.PAS < prev    next >
Pascal/Delphi Source File  |  1993-01-04  |  1KB  |  43 lines

  1. { Author:
  2.     7/17/88    Michael Shunfenthal  Compuserve ID [76320,122]
  3.  
  4. This program tests the graphics search function in file GRINITUN:
  5. Determine the adapter type, and search for the driver file.  For more
  6. info, refer to the file GRINIT.DOC.
  7. }
  8. program grinitdriver;
  9. uses graph, grinitun;
  10.  
  11. var
  12.    foundgraphdriver  : boolean;
  13.    drenvironvar,
  14.    drdirfound        : string;
  15.    drGraphDriver     : integer;
  16.    drgrdebug         : 0..2;
  17.  
  18. begin {main procedure}
  19.    drenvironvar := 'path'; { you don't have to set this value to
  20.                            specify the default; 
  21.                            '' (a null string) will do }
  22.    drgrdebug := 2;         { verbose listing of grsearch operations.
  23.                            change to 0 to rely solely on the
  24.                            return value of the function }
  25.    foundgraphdriver := grsearch
  26.           (drenvironvar, drGraphDriver, drdirfound, drgrdebug);
  27. { to avoid the use of extra variables, the above can be replaced by:
  28.    foundgraphdriver := grsearch ('', drGraphDriver, drdirfound, 2);
  29. }
  30.    if foundgraphdriver
  31.       then
  32.          begin
  33.             outtextxy( 0, 20,
  34.                   'Graphics mode enabled...');
  35.             outtextxy( 0, 40, '(press <return>) to return to text mode');
  36.             readln;
  37.             CloseGraph
  38.          end
  39.       else
  40.          writeln( 'Sorry fella.. something went wrong.');
  41. end. {main procedure}
  42.  
  43.